package com.car.common.model;

import com.car.common.model.base.BaseAdminLog;
import com.car.common.model.base.BaseWebConfig;
import com.jfinal.plugin.activerecord.IBean;
import com.utils.SystemClock;

public class AdminLog extends BaseAdminLog<AdminLog> implements IBean {

	public final static int ADMIN_LOG_TYPE_USERS = 0;
	
	public final static int ADMIN_LOG_TYPE_CARD = 1;
	
	public static void save(int admin_id , int type ,String content) {
		try {
			AdminLog one = new AdminLog();
			one.set("admin_id", admin_id);
			AdminUser adminUser = AdminUser.dao.findById(admin_id);
			one.set("admin_name", adminUser.getUserName());
			one.set("type", type);
			one.set("content", content);
			one.set("createtime", SystemClock.now()/1000L);
			one.save();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
	
	

}
